[Merged by Bors] - refactor(Order/Basic): move Pi & Prop orders to a new file#40658
Conversation
PR summary 7ab71b05d7
|
| Files | Import difference |
|---|---|
| ../mathlib-ci/scripts/pr_summary/import_trans_difference.sh all | |
| There are 7441 files with changed transitive imports taking up over 331369 characters: this is too many to display! | |
You can run this locally from your mathlib4 directory: |
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
Declarations diff (regex)
No declarations were harmed in the making of this PR! 🐙
You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.
Declarations diff (Lean)
✅ Lean-aware diff — post-build, computed from the Lean environment (commit
7ab71b0).
- +0 new declarations
- −0 removed declarations
No declaration differences.
No changes to strong technical debt.
No changes to weak technical debt.
Current commit 7ab71b05d7
Reference commit 9c27dca6e4
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
I think the reason for this PR still applies; we shouldn't ungeneralize the lemmas about the general definitions in core. This might mean having separate Sort and Type sections, or it might mean making an RFC to ungeneralize them upstream. |
Please add the explanation in the commit message above the fold; GitHub discuseions are hard to find in large PRs |
|
Moved that sentence above the fold.
(link) |
|
Oh, I thought you had a reason to justify why it didn't support sorts |
joneugster
left a comment
There was a problem hiding this comment.
Thank you for the PR! This looks reasonable to me.
About the specialisation back from Sort to Type: My personal opinion in this instance is that this kind of generalisation is nice if it works out-of-the-box, but it might not be worth to deal with any complications just for the sake of generalisation. It seems to me that #34391 also has been created in this spirit, i.e. it has been generalised because it works without any issues, not because there was any real use case.
With that, I recommend
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by joneugster. |
|
I'd like to hear from @b-mehta here before reverting his PR |
Pi & Prop orders to a new filePi & Prop orders to a new file and ungeneralize universes
Pi & Prop orders to a new file and ungeneralize universesPi & Prop orders to a new file and ungeneralize universes
Pi & Prop orders to a new file and ungeneralize universesPi & Prop orders to a new file and ungeneralize universes in relation lemmas
|
(the long PR title is perhaps good evidence that this PR is doing two unrelated things that would happen in separate PRs) |
|
I don't think the universe ungeneralisation is a good idea, and it's not clear to me that it's motivated. It looks like exactly one lemma doesn't work with the generalised universes, but that doesn't motivate making a whole series of true lemmas unusable. Can't we just change |
Pi & Prop orders to a new file and ungeneralize universes in relation lemmasPi & Prop orders to a new file
b-mehta
left a comment
There was a problem hiding this comment.
LGTM, will wait for CI then merge
|
(btw my comment above reads a bit snarky to me but I'm not sure how to phrase it better, no snarky-ness intended) Letting |
I think the first half of this question is a good one for Zulip; in particular, this is needed for allow It sounds like the motivation is also that there are other core defs which already are generalized to |
|
Thanks! bors merge |
Move the `LE` instances of `Pi` & `Prop` from `Order/Basic.lean` to a new `Order/Defs/Prop.lean`. This lets `Logic/Relation.lean` import them so that it can use `≤` between relations.
|
Pull request successfully merged into master. Build succeeded: |
Pi & Prop orders to a new filePi & Prop orders to a new file
…rover-community#40658) Move the `LE` instances of `Pi` & `Prop` from `Order/Basic.lean` to a new `Order/Defs/Prop.lean`. This lets `Logic/Relation.lean` import them so that it can use `≤` between relations.
…rover-community#40658) Move the `LE` instances of `Pi` & `Prop` from `Order/Basic.lean` to a new `Order/Defs/Prop.lean`. This lets `Logic/Relation.lean` import them so that it can use `≤` between relations.

Move the
LEinstances ofPi&PropfromOrder/Basic.leanto a newOrder/Defs/Prop.lean.This lets
Logic/Relation.leanimport them so that it can use≤between relations.Extracted from #30526
About the copyright of the new file:
LEon bothPropand functions (calledweak_order_Propandweak_order_funrespectively)preorder_fun)Pi.le_defle_Prop_eq